package Practice.Practice_02.UserManagementSystem;

import java.util.Scanner;

public class SearchUser {
    public static void search(Person[] person){

        Scanner sc = new Scanner(System.in);
        System.out.println("查询全部的用户---------1");
        System.out.println("根据ID查询用户---------2");
        System.out.println("根据姓名查询全用户------3");
        System.out.println("请输入要做的操作");
        int choice = sc.nextInt();
        switch(choice){
            case 1:
                SearchAll.searchAll(person);
                break;
            case 2:
                SearchID.searchID(person);
                break;
            case 3:
                SearchName.searchName(person);
                break;
        }
    }

    public static void search(Person[] person,int index){
        System.out.println("您的信息是：");
        System.out.println(person[index].getId() + " " + person[index].getName() + " "
                + person[index].getPass() + " " + person[index].getEmail() + " " + person[index].getPower());
        System.out.println("=========================");
    }
}
